import NetUtils from '../../common/utils/NetUtils'

const state = {
  DataList: []
}

const mutations = {
  PushDataList (state, data) {
    state.DataList = data.info
  }
}

const actions = {
  GetDataList ({commit}, data) {
    let requestUrl = 'http://happy.dpxiao.com/api/v1/user/getList'
    NetUtils.R(requestUrl, null, function (res) {
      commit({
        type: 'PushDataList',
        info: res.data
      })
    })
  }
}

export default {
  state,
  mutations,
  actions
}
